Skip to content

Conversation

@amoghrajesh
Copy link
Contributor

Structlog released 25.4.0 changing some log trace structure leading to our CI failing:

FAILED task-sdk/tests/task_sdk/definitions/test_xcom_arg.py::test_xcom_map_error_fails_task - AssertionError: assert [{'event': 'Task failed with exception', 'exception': [{'exc_notes': [], 'exc_type': 'RuntimeError', 'exc_value': 'nope', 'exceptions': [], ...}], 'level': 'error', 'timestamp': '2025-06-02T13:52:49.877193Z'}] == [{'event': 'Task failed with exception', 'level': 'error', 'timestamp': <ANY>, 'exception': [{'exc_notes': [], 'exc_type': 'RuntimeError', 'exc_value': 'nope', 'frames': <ANY>, 'is_cause': False, 'syntax_error': None}]}]
  One item replaced:
  Omitting 3 identical items, use -vv to show
  Differing items:
  {'exception': [{'exc_notes': [], 'exc_type': 'RuntimeError', 'exc_value': 'nope', 'exceptions': [], ...}]} != {'exception': [{'exc_notes': [], 'exc_type': 'RuntimeError', 'exc_value': 'nope', 'frames': <ANY>, ...}]}
  
  Full diff:
    {
        'event': 'Task failed with exception',
        'exception': [
            {
                'exc_notes': [],
                'exc_type': 'RuntimeError',
                'exc_value': 'nope',
  +             'exceptions': [],
  -             'frames': <ANY>,
  ?                       ^^^^^^
  +             'frames': [
  ?                       ^
  +                 {
  +                     'filename': '/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py',
  +                     'lineno': 856,
  +                     'name': 'run',
  +                 },
  +                 {
  +                     'filename': '/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py',
  +                     'lineno': 776,
  +                     'name': '_prepare',
  +                 },
  +                 {
  +                     'filename': '/opt/airflow/task-sdk/src/airflow/sdk/execution_time/task_runner.py',
  +                     'lineno': 277,
  +                     'name': 'render_templates',
  +                 },
  +                 {
  +                     'filename': '/opt/airflow/task-sdk/src/airflow/sdk/definitions/mappedoperator.py',
  +                     'lineno': 826,
  +                     'name': 'render_template_fields',
  +                 },
  +                 {
  +                     'filename': '/opt/airflow/task-sdk/src/airflow/sdk/bases/decorator.py',
  +                     'lineno': 576,
  +                     'name': '_expand_mapped_kwargs',
  +                 },
  +                 {
  +                     'filename': '/opt/airflow/task-sdk/src/airflow/sdk/definitions/mappedoperator.py',
  +                     'lineno': 697,
  +                     'name': '_expand_mapped_kwargs',
  +                 },
  +                 {
  +                     'filename': '/opt/airflow/task-sdk/src/airflow/sdk/definitions/_internal/expandinput.py',
  +                     'lineno': 264,
  +                     'name': 'resolve',
  +                 },
  +                 {
  +                     'filename': '/opt/airflow/task-sdk/src/airflow/sdk/definitions/xcom_arg.py',
  +                     'lineno': 389,
  +                     'name': '__getitem__',
  +                 },
  +                 {
  +                     'filename': '/opt/airflow/task-sdk/tests/task_sdk/definitions/test_xcom_arg.py',
  +                     'lineno': 160,
  +                     'name': 'does_not_work_with_c',
  +                 },
  +             ],
                'is_cause': False,
  +             'is_group': False,
                'syntax_error': None,
            },
        ],
        'level': 'error',
  -     'timestamp': <ANY>,
  +     'timestamp': '2025-06-02T13:52:49.877193Z',

Updating the min version to 25.4.0 and handling test failures accordingly.


^ Add meaningful description above
Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in airflow-core/newsfragments.

@amoghrajesh amoghrajesh self-assigned this Jun 2, 2025
@amoghrajesh amoghrajesh requested review from ashb and kaxil as code owners June 2, 2025 15:03
@amoghrajesh amoghrajesh added the backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch label Jun 2, 2025
@amoghrajesh
Copy link
Contributor Author

Fixed by #51311

@amoghrajesh amoghrajesh merged commit be50a01 into apache:main Jun 2, 2025
70 checks passed
github-actions bot pushed a commit that referenced this pull request Jun 2, 2025
…#51306)

(cherry picked from commit be50a01)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
@github-actions
Copy link

github-actions bot commented Jun 2, 2025

Backport successfully created: v3-0-test

Status Branch Result
v3-0-test PR Link

kaxil pushed a commit that referenced this pull request Jun 3, 2025
…#51306)

(cherry picked from commit be50a01)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
potiuk pushed a commit that referenced this pull request Jun 3, 2025
…#51306)

(cherry picked from commit be50a01)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
kaxil added a commit that referenced this pull request Jun 3, 2025
…#51306) (#51313)

* Add Release notes for 3.0.2

* [v3-0-test] Allow test migration to pytest 8.4.0 (#51349) (#51359)

* Allow migration to pytest 8.4.0

* fixup! Allow migration to pytest 8.4.0

---------
(cherry picked from commit be59eda)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>

* [v3-0-test] Bump structlog min to 25.4.0 and handle tests accordingly (#51306)
(cherry picked from commit be50a01)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>

---------

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
kaxil added a commit that referenced this pull request Jun 3, 2025
…#51306) (#51313)

* Add Release notes for 3.0.2

* [v3-0-test] Allow test migration to pytest 8.4.0 (#51349) (#51359)

* Allow migration to pytest 8.4.0

* fixup! Allow migration to pytest 8.4.0

---------
(cherry picked from commit be59eda)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>

* [v3-0-test] Bump structlog min to 25.4.0 and handle tests accordingly (#51306)
(cherry picked from commit be50a01)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>

---------

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
kaxil added a commit that referenced this pull request Jun 3, 2025
…#51306) (#51313)

* Add Release notes for 3.0.2

* [v3-0-test] Allow test migration to pytest 8.4.0 (#51349) (#51359)

* Allow migration to pytest 8.4.0

* fixup! Allow migration to pytest 8.4.0

---------
(cherry picked from commit be59eda)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>

* [v3-0-test] Bump structlog min to 25.4.0 and handle tests accordingly (#51306)
(cherry picked from commit be50a01)

Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>

---------

Co-authored-by: Kaxil Naik <kaxilnaik@gmail.com>
Co-authored-by: Jarek Potiuk <jarek@potiuk.com>
Co-authored-by: Amogh Desai <amoghrajesh1999@gmail.com>
sanederchik pushed a commit to sanederchik/airflow that referenced this pull request Jun 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:task-sdk backport-to-v3-1-test Mark PR with this label to backport to v3-1-test branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants